<script>
APP = $merge(APP, {
	base: '<?php echo site_url(array('psdm','perbuatan'))?>',
	onLoad: ADD_HANDLER.onLoad_add
});
</script>
<h2 style="border-bottom: 1px solid #ccc;">Perbuatan :: Add</h2>
<form id="frmModal" action="<?php echo site_url(array('psdm','perbuatan','ajax','save')) ?>" method="post">

<h3 style="padding-bottom: 5; margin-bottom: 0">Pelapor</h3>
<table cellpadding="5" style="margin-left: 5px" cellspacing="0" width="100%">
<tr>
	<td width="20%">Nama:</td>
	<td colspan="2">
		<input name="inp[0][0]" type="hidden" maxlength="20" />
		<input name="inp[0][1]" class="validate['required']" type="text" maxlength="20" />
		<input id="tpl_pelapor" type="button" class="button" value="Search" />
	</td>
</tr>
<tbody id="noPelaporID" style="display: table-row-group;">
<tr>
	<td>Alamat:</td>
	<td width="40%">
		<input id="tpl_alm1" name="inp[1][0]" class="validate['required']" type="text" style="width: 100%" maxlength="45" />
	</td>
	<td valign="top">
		<select id="tpl_alm2" class="validate['required']" name="inp[1][1]">
		<option>--- pilih ---</option>
		<?php foreach($kota_options->result_array() as $rr): ?>
			<option value="<?php echo $rr['kota_id']?>"><?php echo $rr['kota_nama']?></option>
		<?php endforeach?>
		</select>
	</td>
</tr>
<tr>
	<td></td>
	<td colspan="2"><a class="fakeLink" onclick="ADD_HANDLER.more_alm(this)">tambah</a></td>
</tr>
<tr>
	<td>Telepon:</td>
	<td>
		<input id="tpl_tlp1" name="inp[2][0]" class="validate['required','number']" type="text" style="width: 50px" maxlength="5" /> - 
		<input id="tpl_tlp2" name="inp[2][1]" class="validate['required','number']" type="text" maxlength="15" />
	</td>
</tr>
<tr>
	<td></td>
	<td colspan="2"><a class="fakeLink" onclick="ADD_HANDLER.more_tlp(this)">tambah</a></td>
</tr>
</tbody>
<tr id="yesPelaporID" style="display: none;">
	<td></td>
	<td colspan="2"><a class="fakeLink" onclick="ADD_HANDLER._actionListener_searchPelapor_pick()">bersih</a></td>
</tr>
</table>

<h3 style="padding-bottom: 5; margin-bottom: 0">Perbuatan</h3>
<table cellpadding="5" style="margin-left: 5px" cellspacing="0" width="100%">
<tr>
	<td width="20%">Tanggal Lapor:</td>
	<td><input name="inp[3]" type="text" class="datepicker validate['required']" style="width: 180px" value="" /></td>
</tr>
<tr>
	<td>Tanggal Kejadian:</td>
	<td><input name="inp[4]" type="text" class="datepicker validate['required']" style="width: 180px" /></td>
</tr>
<tr>
	<td>Tempat Kejadian:</td>
	<td><input name="inp[5]" type="text" class="validate['required']" style="width: 300px" maxlength="45" /></td>
</tr>
<tr>
	<td valign="top"><div style="padding-top: 2px">Kategori Perbuatan:</div></td>
	<td>
		<input type="hidden" name="inp[6]" value="" />
		<input type="text" value="" disabled="disabled" class="validate['required']" />
		<input id="tpl_kategoriButton" type="button" class="button" value="Search" />
		<table id="prepel" width="100%" style="position:  relative; display: none;">
			<tr>
				<td width="50px">Jenis:</td>
				<td></td>
			</tr>
			<tr>
				<td>Bidang:</td>
				<td></td>
			</tr>
			<tr>
				<td>Tingkat:</td>
				<td></td>
			</tr>
		</table>
	</td>
</tr>
<tr>
	<td>Karyawan Pelaku:</td>
	<td>
		<input id="tpl_kary1" type="text" class="validate['required']" disabled="disabled" />
		<input id="tpl_kary2" name="inp[7][0]" type="hidden" />
		<input id="tpl_kary3" type="button" class="button" value="Search" />
	</td>
</tr>
<tr>
	<td></td>
	<td><a class="fakeLink" onclick="ADD_HANDLER.more_kary(this)">tambah</a></td>
</tr>
<tr>
	<td valign="top"><div style="padding-top: 2px" >Keterangan:</div></td>
	<td><textarea name="inp[8]" cols="55" rows="4" class="validate['required','length[4,-1]']"></textarea></td>
</tr>
<tr>
	<td valign="top"><div style="padding-top: 2px">Bukti:</div></td>
	<td>
		<div id="fcUpload"> 
		<input id="fcUpload-check" type="hidden" class="validate['required','target:fcUpload-attach']" />
		<a href="#" id="fcUpload-attach">Attach a file</a> 
		<ul id="fcUpload-list"></ul> 
		<a href="#" id="fcUpload-attach-2" style="display: none;">Attach another file</a> 
	</div> 
 	</td>
</tr>
</table>
<div style="border-top:1px solid #ccc; text-align: center; padding-top: 10px; margin-top: 20px">
	<input type="Submit" value="Save" class="button" />
	<input type="button" value="Cancel" class="button" onclick="document.location='<?php echo site_url(array('psdm','perbuatan')) ?>'" />
</div>
</form>
